#ifndef CONNCTION_H
#define CONNCTION_H

#include <QObject>
#include <QTcpSocket>
/**
 * 与客户端的连接
 * @brief The Connction class
 */
class Connection : public QTcpSocket
{
    Q_OBJECT
public:
   explicit Connection(qintptr handle, QObject * parent);
   ~Connection();
public slots:
    /**
     * 有数据可读
     * @brief slotReadClientData
     */
    void slotReadClientData();
    /**
     * 连接断开
     * @brief slotClientDisconnected
     */
    void slotClientDisconnected();
signals:
    /**
     * 有数据可读
     * @brief recvdData
     */
    void recvdData(Connection *);
    /**
     * 连接断开
     * @brief disconnected
     */
    void disconnected(Connection *);
};
#endif // CONNCTION_H
